package cn.thr.ymcc.web.controller;

import cn.thr.ymcc.dto.Logininfodto;
import cn.thr.ymcc.result.JsonResult;
import cn.thr.ymcc.service.ILoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Logininfo")
public class LogininfoController {
    //把写的那个service 类给掉过来
    @Autowired
    private ILoginService loginService;

    /**
     * 统一登录平台  前后端通用
     * 登录接口
     * @param logininfodto
     * @return
     */
    @PostMapping("/common")
    public JsonResult accountLogininfo(@RequestBody Logininfodto logininfodto){

        return loginService.accountLogininfo(logininfodto);
    }
}
